import {createBrowserRouter} from 'react-router-dom';
import Error from './Error';
import Framework from './Framework'
import Preface from '@/pages/preface';
import Graphic from '@/pages/graphic';
import History from '@/pages/history';
import MathSth from '@/pages/math-sth';
import NoodleRestaurant from '@/pages/noodle-restaurant';

const router = createBrowserRouter([
  {
    path: '/',
    element: <Framework/>,
    errorElement: <Error/>,
    children: [
      {index: true, element: <Preface/>},
      {
        path: 'preface',
        element: <Preface/>,
      },
      {
        path: 'graphic',
        element: <Graphic/>,
      },
      {
        path: 'history',
        element: <History/>,
      },
      {
        path: 'math-sth',
        element: <MathSth/>,
      },
      {
        path: 'noodle-restaurant',
        element: <NoodleRestaurant/>,
      },
    ],
  },
]);

export default router;
